package cn.caiyj.algorithm.sort;

import cn.caiyj.algorithm.util.RandomUtil;
import com.alibaba.fastjson.JSON;

import java.awt.image.TileObserver;

/**
 * @Description:
 * @author:CAIYJ
 * @Date:2018/10/24 21:35
 */
public class Test {

    public static void main(String[] args) {
        Long[] a = RandomUtil.randomLongArray(10, 100);
        long time = System.currentTimeMillis();
        Long[] a1 = a.clone();
        Selection.sort(a1.clone(), false);
        time = System.currentTimeMillis() - time;
        System.out.println("time:" + time);
        Long[] a2 = a.clone();
        time = System.currentTimeMillis();
        Insertion.sort(a2, false);
        time = System.currentTimeMillis() - time;
        System.out.println("time:" + time);
        Long[] a3 = a.clone();
        time = System.currentTimeMillis();
        Shell.sort(a3, true);
        time = System.currentTimeMillis() - time;
        System.out.println("time:" + time);
    }
}
